package com.threeonemeeting.listcache;

import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.threeonemeeting.R;

public class MyMeetingInfoCache {

	private View baseView;
	private int meetingId;
	private ImageView meetingImageView;

	private TextView meetingTitleTextView;
	private TextView meetingTimeTextView;
	private TextView meetingTypeTextView;
	private TextView meetCategoryTextView; // 是演讨论还是展览之类

	private Button btnMeetingDocument; // 资料按钮
	private Button btnMeetingComments; // 评论按钮
	private Button btnMeetingUsers; // 用户按钮

	public MyMeetingInfoCache(View baseView, int meetingId) {
		this.baseView = baseView;
		this.meetingId = meetingId;
	}

	public int getMeetingId() {
		return this.meetingId;
	}

	public ImageView getMeetingImageView() {
		if (meetingImageView == null) {
			meetingImageView = (ImageView) baseView
					.findViewById(R.id.meeting_image);
		}
		return meetingImageView;
	}

	public TextView getMeetingTitleTextView() {
		if (meetingTitleTextView == null) {
			meetingTitleTextView = (TextView) baseView
					.findViewById(R.id.meeting_title);
		}
		return meetingTitleTextView;
	}

	public TextView getMeetingTypeTextView() {
		if (meetingTypeTextView == null) {
			meetingTypeTextView = (TextView) baseView
					.findViewById(R.id.meeting_type);
		}

		return meetingTypeTextView;
	}

	public TextView getMeetingTimeTextView() {
		if (meetingTimeTextView == null) {
			meetingTimeTextView = (TextView) baseView
					.findViewById(R.id.meeting_time);
		}
		return meetingTimeTextView;
	}

	public TextView getMeetingCategoryTextView() {
		if (meetCategoryTextView == null) {
			meetCategoryTextView = (TextView) baseView
					.findViewById(R.id.meeting_category);
		}
		return meetCategoryTextView;
	}

	public Button getMeetingDocsBtn() {
		if (btnMeetingDocument == null) {
			btnMeetingDocument = (Button) baseView
					.findViewById(R.id.btn_meeting_data);
		}
		return btnMeetingDocument;
	}
	
	public Button getMeetingCommentsBtn() {
		if (btnMeetingComments == null) {
			btnMeetingComments = (Button) baseView
					.findViewById(R.id.btn_meeting_comment);
		}
		return btnMeetingComments;
	}
	
	public Button getMeetingUserBtn() {
		if (btnMeetingUsers == null) {
			btnMeetingUsers = (Button) baseView
					.findViewById(R.id.btn_meeting_user);
		}
		return btnMeetingUsers;
	}
}
